package oop.ex2.variables;

import java.util.regex.Pattern;

public enum varType{
	INT("\\d+"),
	DOUBLE("\\d+\\.?\\d*"),
	STRING("\"\\w\""),
	BOOLEAN("true|false"),
	CHAR("\\'.*\\'");
	
	
	private final Pattern patt;
	
	/**
	 * counstruct a new enum with the desired pattern
	 * @param pattern the pattern in string form
	 */
	private varType(String pattern) {
		this.patt=Pattern.compile(pattern);
	}
	
	/**
	 * returns the pattern
	 * @return the pattern
	 */
	public Pattern getPatt() {
		return patt;
	}

}